/*
 * Copyright 2016-2017 TVI Go Easy.
 * Created on 2017/4/30 02:22
 */
package org.mechanic.fund.config;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.Serializable;

/**
 * 微信相关属性。
 * 该文件中的属性会在系统启动的时候在监听器中初始化，可全局使用。
 *
 * @author mechanic
 * @version 0.0.1
 */
@ConfigurationProperties(ignoreInvalidFields = true)
public class WcBaseInfoProperties implements Serializable {

    private static final long serialVersionUID = -9151479629334700410L;
    /**
     * 公众号主键编号
     */
    private String id;
    /**
     * 公众号名称
     */
    private String name;
    /**
     * 公众号ID
     */
    private String mpId;
    /**
     * 公众号密钥
     */
    private String secret;
    /**
     * 公众号类型。1=订阅号，2=服务号，3=企业号，4=小程序
     */
    private Integer type;
    /**
     * 企业号返回的token
     */
    private String corpToken;

    /**
     * 应用回调的token。
     */
    private String appToken;
    /**
     * 应用回调的key
     */
    private String appEncodingAESKey;
    /**
     * 是否通过微信官方认证
     */
    private Integer isAuthc;
    /**
     * 公众号二维码
     */
    private String qrcode;

    public WcBaseInfoProperties() {
    }

    public WcBaseInfoProperties(
      String id,
      String name,
      String mpId,
      String secret,
      Integer type,
      String corpToken, String appToken, String appEncodingAESKey, Integer isAuthc, String qrcode) {
        this.id = id;
        this.name = name;
        this.mpId = mpId;
        this.secret = secret;
        this.type = type;
        this.corpToken = corpToken;
        this.appToken = appToken;
        this.appEncodingAESKey = appEncodingAESKey;
        this.isAuthc = isAuthc;
        this.qrcode = qrcode;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMpId() {
        return mpId;
    }

    public void setMpId(String mpId) {
        this.mpId = mpId;
    }

    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getCorpToken() {
        return corpToken;
    }

    public void setCorpToken(String corpToken) {
        this.corpToken = corpToken;
    }

    public String getAppToken() {
        return appToken;
    }

    public void setAppToken(String appToken) {
        this.appToken = appToken;
    }

    public String getAppEncodingAESKey() {
        return appEncodingAESKey;
    }

    public void setAppEncodingAESKey(String appEncodingAESKey) {
        this.appEncodingAESKey = appEncodingAESKey;
    }

    public Integer getIsAuthc() {
        return isAuthc;
    }

    public void setIsAuthc(Integer isAuthc) {
        this.isAuthc = isAuthc;
    }

    public String getQrcode() {
        return qrcode;
    }

    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
